package com.ruoyi.contract.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.contract.mapper.InvoiceAttachmentMapper;
import com.ruoyi.contract.domain.InvoiceAttachment;
import com.ruoyi.contract.service.IInvoiceAttachmentService;

/**
 * 发票附件Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-18
 */
@Service
public class InvoiceAttachmentServiceImpl implements IInvoiceAttachmentService 
{
    @Autowired
    private InvoiceAttachmentMapper invoiceAttachmentMapper;

    /**
     * 查询发票附件
     * 
     * @param invoiceAttachmentId 发票附件主键
     * @return 发票附件
     */
    @Override
    public InvoiceAttachment selectInvoiceAttachmentByInvoiceAttachmentId(Long invoiceAttachmentId)
    {
        return invoiceAttachmentMapper.selectInvoiceAttachmentByInvoiceAttachmentId(invoiceAttachmentId);
    }

    /**
     * 查询发票附件列表
     * 
     * @param invoiceAttachment 发票附件
     * @return 发票附件
     */
    @Override
    public List<InvoiceAttachment> selectInvoiceAttachmentList(InvoiceAttachment invoiceAttachment)
    {
        return invoiceAttachmentMapper.selectInvoiceAttachmentList(invoiceAttachment);
    }

    /**
     * 新增发票附件
     * 
     * @param invoiceAttachment 发票附件
     * @return 结果
     */
    @Override
    public int insertInvoiceAttachment(InvoiceAttachment invoiceAttachment)
    {
        return invoiceAttachmentMapper.insertInvoiceAttachment(invoiceAttachment);
    }

    /**
     * 修改发票附件
     * 
     * @param invoiceAttachment 发票附件
     * @return 结果
     */
    @Override
    public int updateInvoiceAttachment(InvoiceAttachment invoiceAttachment)
    {
        return invoiceAttachmentMapper.updateInvoiceAttachment(invoiceAttachment);
    }

    /**
     * 批量删除发票附件
     * 
     * @param invoiceAttachmentIds 需要删除的发票附件主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceAttachmentByInvoiceAttachmentIds(Long[] invoiceAttachmentIds)
    {
        return invoiceAttachmentMapper.deleteInvoiceAttachmentByInvoiceAttachmentIds(invoiceAttachmentIds);
    }

    /**
     * 删除发票附件信息
     * 
     * @param invoiceAttachmentId 发票附件主键
     * @return 结果
     */
//    @Override
//    public int deleteInvoiceAttachmentByInvoiceAttachmentId(Long invoiceAttachmentId)
//    {
//        return invoiceAttachmentMapper.deleteInvoiceAttachmentByInvoiceAttachmentId(invoiceAttachmentId);
//    }
}
